home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / quasrsql.zip / SQL.GBL < prev    next >
Text File  |  1991-12-05  |  9KB  |  209 lines

  1. '
  2. '  SQL.GBL - Header file for Quasar SQL Application Programming Interface
  3. '
  4. '  LANGUAGE      : Microsoft Visual Basic 1.00
  5. '  MODEL         : N/A
  6. '  ENVIRONMENT   : Microsoft Windows 3.0
  7. '
  8. '  Developed by:
  9. '    Philip Roll
  10. '    Ming-Li Wang
  11. '
  12. '  (C) Copyright 1991
  13. '  Stellar Industries
  14. '  3335 S. Falcon Ridge Road
  15. '  Diamond Bar  CA 91765
  16. '  (714) 861-7885
  17.  
  18. '  Data classes:
  19.  
  20. Global Const SqlDataClassAPPROXIMATE = 0
  21. Global Const SqlDataClassBINARY = 1
  22. Global Const SqlDataClassCHAR = 2
  23. Global Const SqlDataClassEXACT = 3
  24. Global Const SqlDataClassINVALID = 4
  25.  
  26. '  Data types:
  27.  
  28. Global Const SqlDataTypeBINARY = 0
  29. Global Const SqlDataTypeCHAR = 1
  30. Global Const SqlDataTypeDECIMAL = 2
  31. Global Const SqlDataTypeDOUBLE = 3
  32. Global Const SqlDataTypeFLOAT = 4
  33. Global Const SqlDataTypeINTEGER = 5
  34. Global Const SqlDataTypeNUMERIC = 6
  35. Global Const SqlDataTypeREAL = 7
  36. Global Const SqlDataTypeSMALLINT = 8
  37. Global Const SqlDataTypeVARCHAR = 9
  38. Global Const SqlDataTypeINVALID = 10
  39.  
  40. '  Error codes:
  41.  
  42. Global Const SqlErrorAmbiguousColumn =        1
  43. Global Const SqlErrorBadEnvironment =         2
  44. Global Const SqlErrorBinaryNotAllowed =       3
  45. Global Const SqlErrorCannotActivateFile =     4
  46. Global Const SqlErrorCannotCloseFile =        5
  47. Global Const SqlErrorCannotCloseLog =         6
  48. Global Const SqlErrorCannotCreateDataFile =   7
  49. Global Const SqlErrorCannotCreateDumpFile =   8
  50. Global Const SqlErrorCannotCreateFile =       9
  51. Global Const SqlErrorCannotCreateKeyFile =    10
  52. Global Const SqlErrorCannotCreateLog =        11
  53. Global Const SqlErrorCannotDeleteFile =       12
  54. Global Const SqlErrorCannotDropSystemAdmin =  13
  55. Global Const SqlErrorCannotDropTable =        14
  56. Global Const SqlErrorCannotOpenDataFile =     15
  57. Global Const SqlErrorCannotOpenFile =         16
  58. Global Const SqlErrorCannotOpenKeyFile =      17
  59. Global Const SqlErrorCannotOpenLog =          18
  60. Global Const SqlErrorCannotRemoveTable =      19
  61. Global Const SqlErrorCannotRevokeByColumn =   20
  62. Global Const SqlErrorCharNotAllowed =         21
  63. Global Const SqlErrorCheckpointDetected =     22
  64. Global Const SqlErrorDataFileCorrupted =      23
  65. Global Const SqlErrorDatabaseCorrupt =        24
  66. Global Const SqlErrorDbaNotAvailable =        25
  67. Global Const SqlErrorDivideByZero =           26
  68. Global Const SqlErrorDuplicateColumn =        27
  69. Global Const SqlErrorDuplicateRecord =        28
  70. Global Const SqlErrorExistingDataFile =       29
  71. Global Const SqlErrorExistingKeyFile =        30
  72. Global Const SqlErrorFileReadFailed =         31
  73. Global Const SqlErrorFileSeekFailed =         32
  74. Global Const SqlErrorFileWriteFailed =        33
  75. Global Const SqlErrorGlobalAllocFailed =      34
  76. Global Const SqlErrorGlobalFreeFailed =       35
  77. Global Const SqlErrorGlobalLockFailed =       36
  78. Global Const SqlErrorGlobalUnlockFailed =     37
  79. Global Const SqlErrorImportParseError =       38
  80. Global Const SqlErrorIncompatibleTypes =      39
  81. Global Const SqlErrorIndexExists =            40
  82. Global Const SqlErrorIndexUndoFailed =        41
  83. Global Const SqlErrorInitializationFailed =   42
  84. Global Const SqlErrorInsufficientBuffer =     43
  85. Global Const SqlErrorInternalError =          44
  86. Global Const SqlErrorInvalidColumnSpec =      45
  87. Global Const SqlErrorInvalidColumnType =      46
  88. Global Const SqlErrorInvalidCursor =          47
  89. Global Const SqlErrorInvalidData =            48
  90. Global Const SqlErrorInvalidEscapeChar =      49
  91. Global Const SqlErrorInvalidPattern =         50
  92. Global Const SqlErrorInvalidUser =            51
  93. Global Const SqlErrorKeyFileCorrupted =       52
  94. Global Const SqlErrorListSizesUnequal =       53
  95. Global Const SqlErrorLockTableFailure =       54
  96. Global Const SqlErrorMaximumKeySizeExceeded = 55
  97. Global Const SqlErrorMultipleSelects =        56
  98. Global Const SqlErrorNoColumnExists =         57
  99. Global Const SqlErrorNoIndexExists =          58
  100. Global Const SqlErrorNoOldRecord =            59
  101. Global Const SqlErrorNoTableExists =          60
  102. Global Const SqlErrorNoUserExists =           61
  103. Global Const SqlErrorNodeSizeTooSmall =       62
  104. Global Const SqlErrorNotAggregate =           63
  105. Global Const SqlErrorNotGroupingColumn =      64
  106. Global Const SqlErrorNotInGroupedTable =      65
  107. Global Const SqlErrorNotSingleRecord =        66
  108. Global Const SqlErrorNoUserSlotsAvailable =   67
  109. Global Const SqlErrorNullInNotNullCol =       68
  110. Global Const SqlErrorNullNotAllowed =         69
  111. Global Const SqlErrorParserSyntaxError =      70
  112. Global Const SqlErrorParserStackOverflow =    71
  113. Global Const SqlErrorPrecisionConflict =      72
  114. Global Const SqlErrorResultTableExists =      73
  115. Global Const SqlErrorScaleOverflow =          74
  116. Global Const SqlErrorSecurityViolation =      75
  117. Global Const SqlErrorSetFunctionsNested =     76
  118. Global Const SqlErrorStarNotAllowed =         77
  119. Global Const SqlErrorSubqueryNotOneColumn =   78
  120. Global Const SqlErrorSystemAdminRequired =    79
  121. Global Const SqlErrorTableConflict =          80
  122. Global Const SqlErrorTableExists =            81
  123. Global Const SqlErrorTooManyColumnNames =     82
  124. Global Const SqlErrorTooManyTablesOpen =      83
  125. Global Const SqlErrorTrialSizeExceeded =      84
  126. Global Const SqlErrorVariableHeaderMark =     85
  127. Global Const SqlErrorVariableHeaderSize =     86
  128. Global Const SqlErrorVariableHeaderWrong =    87
  129. Global Const SqlErrorVariableHeaderZero =     88
  130. Global Const SqlErrorWrongVersion =           89
  131.  
  132. '  Record structure formats:
  133.  
  134. Global Const SqlFlagFormatPadded = 0
  135. Global Const SqlFlagFormatString = 1
  136. Global Const SqlFlagFormatStructure = 2
  137.  
  138. '  Auto commit options:
  139.  
  140. Global Const SqlFlagAutoCommitOnLogout = 16
  141.  
  142. '  Maximum number of characters in a key:
  143.  
  144. Global Const SqlMaximumKeySize = 192
  145.  
  146. '  Maximum number of significant characters in named entity:
  147.  
  148. Global Const SqlMaximumNameLength = 32
  149.  
  150. '  Global types:
  151.  
  152. Type SqlColumnType
  153.   RightJustified As Integer
  154.   ColumnHeading As String * 33
  155.   ColumnSequenceNumber As Integer
  156.   DataType As Integer
  157.   DataClass As Integer
  158.   FieldWidth As Integer
  159.   Precision As Integer
  160.   Scale As Integer
  161. End Type
  162.  
  163. Type SqlControlType
  164.   ErrorDetail As String * 65
  165.   ErrorMessage As String * 257
  166.   HiLiteLength As Integer
  167.   HiLiteOffset As Integer
  168.   Padding As Integer
  169.   RecordBufferSize As Integer
  170.   ResultCode As Integer
  171.   RecordPosition As Long
  172.   Reserved0 As Long
  173.   Reserved1 As Long
  174.   Reserved2 As Long
  175.   Reserved3 As Long
  176.   Reserved4 As Long
  177.   Flags As Integer
  178. End Type
  179.  
  180. Type SqlStatusType
  181.   NumberOfRecordDeletes As Long
  182.   NumberOfRecordInserts As Long
  183.   NumberOfRecordSelects As Long
  184.   NumberOfRecordUpdates As Long
  185.   TimeElapsed As Long
  186. End Type
  187.  
  188. Type SqlTableType
  189.   NumberOfColumns As Integer
  190.   RecordSize As Integer
  191.   NumberOfRecords As Long
  192. End Type
  193.  
  194. '  Function prototypes:
  195.  
  196. Declare Function SqlCursorClose Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType) As Integer
  197. Declare Function SqlCursorOpen Lib "sql.dll" (ByVal User As Integer, SqlControl As SqlControlType) As Integer
  198. Declare Function SqlDescribeColumn Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal ColumnNumber As Integer, SqlColumn As SqlColumnType) As Integer
  199. Declare Function SqlDescribeTable Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, SqlTable As SqlTableType) As Integer
  200. Declare Function SqlExecute Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal QueryText As String) As Integer
  201. Declare Function SqlFetchFirst Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordBuffer As String) As Integer
  202. Declare Function SqlFetchLast Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordBuffer As String) As Integer
  203. Declare Function SqlFetchNext Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordBuffer As String) As Integer
  204. Declare Function SqlFetchPositioned Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordPosition As Long, ByVal RecordBuffer As String) As Integer
  205. Declare Function SqlFetchPrevious Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, ByVal RecordBuffer As String) As Integer
  206. Declare Function SqlGetStatus Lib "sql.dll" (ByVal User As Integer, ByVal Cursor As Integer, SqlControl As SqlControlType, SqlStatus As SqlStatusType) As Integer
  207. Declare Function SqlLogin Lib "sql.dll" (SqlControl As SqlControlType, ByVal UserName As String, ByVal UserPassword As String) As Integer
  208. Declare Function SqlLogout Lib "sql.dll" (ByVal User As Integer, SqlControl As SqlControlType) As Integer
  209.